'''Union联合类型注解'''
# 导入Union包
from typing import Union

my_list : list[Union[int, str, bool]] = [1, 43, "核力量", "abc", True]
print(my_list)


#可以传入int 或str; 返回也是int 或 str
def func(data: Union[int, str]) -> Union[int, str]:
    pass

func()
